<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>乐淘-用户管理</title>
	<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="css/system.css">
	<script src="assets/jquery/jquery.min.js"></script>
	<script src="assets/bootstrap/js/bootstrap.min.js"></script>
	<script src="assets/artTemplate/template-native.js"></script>
	<script src="js/common.js"></script>
	<script src="js/user.js"></script>
</head>
<body>
	<div class="system">
		<div class="aside">
			<div class="profile">
				<div class="avatar img-circle">
					<img src="images/my_logo.jpg">
				</div>
				<h4>张学友</h4>
			</div>
			<div class="navs">
				<ul class="list-unstyled">
					<li class="active">
						<a href="user.html">
							<i class="fa fa-user"></i>
							用户管理
						</a>
					</li>
					<li>
						<a href="javascript:;">
							<i class="fa fa-bars"></i>
							分类管理
							<i class="fa fa-angle-right"></i>
						</a>
						<ul class="list-unstyled">
							<li>
								<a href="category-first.html">一级分类管理</a>
							</li>
							<li>
								<a href="category-second.html">二级分类管理</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="product.html">
							<i class="fa fa-product-hunt"></i>
							商品管理
						</a>
					</li>
				</ul>
			</div>
		</div>
		<div class="main">
			<div class="header">
	            <nav class="navbar navbar-custom">
	                <div class="navbar-header">
	                    <a href="javascript:;" class="navbar-brand">
	                        <i class="fa fa-navicon"></i>
	                    </a>
	                </div>
	                <ul class="nav navbar-nav navbar-right">
	                    <li>
	                        <a href="javascript:;" class="login_out_bot" id="loginOut">
	                            <i class="fa fa-sign-out"></i> 退出
	                        </a>
	                    </li>
	                </ul>
	            </nav>
	        </div>
	        <div class="body">
	        	<table class="table table-bordered" id="userBox">
	        		
	        	</table>
	        </div>
		</div>
	</div>
	<script id="userTpl" type="text/html">
		<tr>
			<th>用户名</th>
			<th>电话</th>
			<th>状态</th>
			<th>操作</th>
		</tr>
		<% for(var i=0;i<data.rows.length;i++){ %>
			<tr>
				<td><%=data.rows[i].username %></td>
				<td><%=data.rows[i].mobile %></td>
				<td>已启用</td>
				<td>
					<button 
					data-id="<%=data.rows[i].id%>"
					data-isDelete="<%=data.rows[i].isDelete %>"
					type="button"
					id="deleteBtn"
					class="btn <%=data.rows[i].isDelete ? 'btn-danger' : 'btn-success' %>"><%=data.rows[i].isDelete ? '禁用' : '启用' %></button>
				</td>
			</tr>
		<% } %>
	</script>
</body>
</html>